import request from '@/request/request'
import qs from 'qs'
// 精品数据
export const JingPinApi = () => request.get('/products/recommend')
// 热门兑换
export const hotApi = () => request.get('/products/hot')
// 详情页数据
export const GoodDetailsAPI = (id) => request.get(`/products/${id}`)


// 短信验证码
export const SendSMSApi = (params) => request.post('/sendSMS', qs.stringify(params))

// 登陆
export const LoginApi = (params) => request.post('/phoneRegin', qs.stringify(params))

// 微信登陆
export const wexinApi = (params) => request.post('/wechatUsers/PCLogin', qs.stringify(params))

// 微信绑定
export const bindingApi = (params) => request.post('/wechatUsers/binding', qs.stringify(params))
// 加入购物车
export const addCartsApi = (params) => request.post('/shop/carts/add', qs.stringify(params))
// 用户数据
export const userProfilesApi = () => request.get('/shop/userProfiles')
// 请求全部商品
export const shopAllApi = (params) => request.get('/products', { params })

// 请求购物车数据
export const shopCartsAllApi = () => request.get('/shop/carts')

// 删除请求
export const delApi = (id) => request.delete(`/shop/carts?productIds=${id}`)




